package com.smartens.boit.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.smartens.boit.MainActivity;
import com.smartens.boit.R;
import com.smartens.boit.base.BaseActivity;
import com.smartens.boit.bean.ElectricBean;
import com.smartens.boit.util.FaultDeal;

import org.greenrobot.eventbus.EventBus;

public class FaultDetailActivity extends BaseActivity {
    private TextView submit;
    private TextView status;
    private TextView remarks;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_fault_detail);

        Intent intent = getIntent();
        String status1 = intent.getStringExtra("status");
        String remarks2 = intent.getStringExtra("remarks");
        submit = findViewById(R.id.submit);
        status = findViewById(R.id.status);
        remarks = findViewById(R.id.remarks);

        status.setText(status1);
        remarks.setText(remarks2);



        submit.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if("未处理".equals(status.getText().toString())){
                   // FaultDeal.setMap("status",1);
                    setResult(0);
                }else {
                   // FaultDeal.setMap("status",2);
                    setResult(1);
                }

                FaultDetailActivity.this.finish();
            }
        });
    }

    @Override
    protected void initView() {

    }

    @Override
    protected void initData() {

    }

}